#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;
struct Node
{
    int num;
    Node* next;
};

void bulid_link_list(Node* dummy_head, int n, int* array)
{
    Node* temp = new Node;
    temp = dummy_head;
    for (int i = 0; i < n; i++)
    {
        Node* cur = new Node;
        temp->next = cur;
        cur->num = array[i];
        temp = temp->next;
    }
}

void print(Node* dummy_head, int n)
{
    int sum = 0;
    Node* temp = new Node;
    temp = dummy_head;
    for (int i = 0; i < n; i++)
    {
        temp = temp->next;
        sum += temp->num;
    }
    cout << sum;
}

int main()
{
    int n;
    cin >> n;
    int array[100];
    for (int i = 0; i < n; i++)
    {
        cin >> array[i];
    }
    Node* dummy_head = new Node;
    bulid_link_list(dummy_head, n, array);
    print(dummy_head, n);
    return 0;
}